package ihm.models.events;

import java.util.EventObject;

import equipments.Equipment;

/**
 * This event is use to notify that the equipment changed.
 * @author Baptiste Legrand & Benjamin Orman
 * @version 1.0
 */
public class EquipmentChangedEvent extends EventObject {
  /**
   * Serial Version Value.
   */
  private static final long serialVersionUID = 1L;
  /**
   * The new equipment.
   */
  private Equipment newEquipment;
  
  /**
   * Create an event used to notify that the equipment has been changed by the
   * equipment given in parameter.
   * @param source - The source of this event.
   * @param newEquipment - The new equipment.
   */
  public EquipmentChangedEvent(Object source, Equipment newEquipment)
  {
    super(source);
    this.newEquipment = newEquipment;
  }

  /**
   * Getter returning the new equipment.
   * @return Equipment - The new equipment.
   */
  public Equipment getNewEquipment() {
    return newEquipment;
  }
}